package advanced.sorm.bean;

import java.util.List;
import java.util.Map;

/*

存储表结构信息
 */
public class TableInfo {
    private String tname;//表明
    private Map<String, Columninfo> columninfos; //所有字段信息
    //唯一主键
    private Columninfo onlyPriKey;
    private List<Columninfo> priKeys;//如果联合主键 ,则在这里存储

    public TableInfo() {
    }

    public TableInfo(String tname, Map<String, Columninfo> columninfos, List<Columninfo> priKeys) {
        this.tname = tname;
        this.columninfos = columninfos;
        this.priKeys = priKeys;
    }

    public List<Columninfo> getPriKeys() {
        return priKeys;
    }

    public void setPriKeys(List<Columninfo> priKeys) {
        this.priKeys = priKeys;
    }

    public String getTname() {
        return tname;
    }

    public void setTname(String tname) {
        this.tname = tname;
    }

    public Map<String, Columninfo> getColumninfos() {
        return columninfos;
    }

    public void setColumninfos(Map<String, Columninfo> columninfos) {
        this.columninfos = columninfos;
    }

    public Columninfo getOnlyPriKey() {
        return onlyPriKey;
    }

    public void setOnlyPriKey(Columninfo onlyPriKey) {
        this.onlyPriKey = onlyPriKey;
    }
}
